import java.util.logging.Logger;

public class CalculationArea implements ICalculationArea   
{
  Logger logger = Logger.getLogger(CalculationArea.class.toString());

  @Override
  public double rectangle(double x, double y) 
  {
    this.logger.info("计算矩形的面积");
    return(x * y);
  }
  @Override
  public double triangle(double x, double y, double z) 
  {
    double p = (x + y + z) / 2;
    this.logger.info("计算三角形的面积");
    return(Math.sqrt(p * (p - x) * (p - y) * (p - z)));
  }
  final static double π = 3.14D;
  @Override
  public double circular(double r) 
  {
    this.logger.info("计算半径为：" + r + " 的面积");
    return(π * r * r);
  }
}
